var e = getApp();

Page({
    data: {
        avatarUrl: "",
        nickName: "",
        index2_back: ""
    },
    // view_a3_tap: function(e) {
    //     wx.navigateTo({
    //         url: "/pages2/bianji/index"
    //     });
    // },
    index2_tap: function(e) {
        wx.navigateTo({
            url: "/pages2/web_view/index"
        });
    },
    view_a4_tap: function (e) {
        var that = this;
        wx.setClipboardData({
         data: "vxx52013141",
         success: function (res) {
          wx.showModal({
           title: '开发者微信',
           content: '复制客服微信成功',
           success: function (res) {
            if (res.confirm) {
             console.log('确定')
            } else if (res.cancel) {
             console.log('取消')
            }
           }
          })
         }
        });
       },
    view_a5_tap: function(e) {
        console.log("123"), this.onShareAppMessage();
    },
    onLoad: function(e) {
        var t = this;
        wx.getUserProfile({
            desc: "展示用户信息",
            success: function(e) {
                console.log(e), t.setData({
                    userInfo: e.userInfo,
                    hasUserInfo: !0
                });
            }
        }), wx.request({
            url: "https://224diy.com/admin/php/call.php?id=3",
            success: function(e) {
                t.setData({
                    index2_back: e.data[2].txt
                });
            }
        });
    },
    onShareAppMessage: function(e) {
        return {
            title: "这里可以免费制作绚丽的信封哦",
            path: "/pages2/index/index",
            imageUrl: "http://inews.gtimg.com/newsapp_ls/0/13427687118/0",
            success: function(e) {
                wx.showToast({
                    title: "分享成功",
                    icon: "success",
                    duration: 2e3
                });
            },
            fail: function(e) {}
        };
    }
});